import matplotlib.pyplot as plt
import numpy as np

#plot(np.arange(10))
mean = 0
sigma = 1
x=mean+sigma*np.random.randn(10000)

fig,(ax0,ax1) = plt.subplots(nrows=2,figsize=(9,6))
ax0.hist(x,40,normed=1,histtype='bar',facecolor='yellowgreen',alpha=0.75)
ax0.set_title('pdf')

ax1.hist(x,20,normed=1,histtype='bar',facecolor='pink',alpha=0.75,cumulative=True,rwidth=0.8)
ax1.set_title("cdf")
fig.subplots_adjust(hspace=0.4)
plt.show()

